package pers.cz.logtail.queue;

/**
 * @program: JefLogTail
 * @description: 消息封装
 * @author: Cheng Zhi
 * @create: 2023-03-15 17:21
 **/
public class Message {

    public Message(String topic,byte[] value){
        this.topic = topic;
        this.value = value;
    }

    public Message(String topic,byte[] value,String key){
        this.topic = topic;
        this.value = value;
        this.key = key;
    }

    public Message(String topic,String value){
        this.topic = topic;
        this.valueStr = value;
    }

    public Message(String topic,String value,String key){
        this.topic = topic;
        this.valueStr = value;
        this.key = key;
    }

    private String valueStr;

    private String topic;
    private byte[] value;
    private String key;

    public String getValueStr() {
        return valueStr;
    }

    public void setValueStr(String valueStr) {
        this.valueStr = valueStr;
    }

    public String getTopic() {
        return topic;
    }
    public void setTopic(String topic) {
        this.topic = topic;
    }
    public byte[] getValue() {
        return value;
    }
    public void setValue(byte[] value) {
        this.value = value;
    }
    public String getKey() {
        return key;
    }
    public void setKey(String key) {
        this.key = key;
    }
}
